This application claims the benefit of Korean Patent Application No. 2002-49902 filed on Aug. 22, 2002, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference.
1. Field of the Invention
The present invention relates to an apparatus for controlling a driving speed of a motor using pulses outputted from an encoder.
2. Description of the Related Art
An encoder is provided in a motor to detect a driving speed thereof. The encoder senses light passing through a plurality of slots formed in a circular disk, which is rotated along with an axis of the motor and then outputs pulses corresponding to the light sensed. A motor controller can detect the driving speed of the motor by counting the pulses outputted from the encoder.
Three methods of measuring the driving speed of the motor using the pulses outputted from the encoder exist. The three measurement methods include an M-type measurement method, a T-type measurement method and an M/T-type measurement method. In the M-type measurement method, the driving speed of the motor is measured by counting a number of pulses inputted for a constant sampling period. Further, in the T-type measurement method, the driving speed of the motor is measured by measuring a time interval between input pulses using high frequency clocks. Furthermore, in the M/T-type measurement method, the driving speed of the motor is measured by counting the number of pulses inputted for a period of time until a first pulse input is inputted after a sampling period. A problem exists in that the driving speed of the motor in low and high-speed regions cannot be exactly measured in the M-type and T-type measurement methods.
Hereinafter, a detailed description will be given of the M/T-type measurement method.
As shown in FIGS. 1A-1C, an encoder outputs two pulse streams P1 and P2 having a phase difference. A phase difference between the first pulse stream P1 and the second pulse stream P2 is 90xc2x0. The encoder outputs of the first pulse stream P1 and the second pulse stream P2 are alternated. A motor controller receives two pulses from the encoder and then generates a third pulse stream P3 by multiplying the two pulses by four.
Referring to FIGS. 2A-2B, the motor controller measures the driving speed of a motor using the following Equation 1.
Motor driving speed (Nf)=(60*fc*m1)/(Pn*m2)xe2x80x83xe2x80x83Equation 1
In Equation 1, Pn denotes a number of pulses outputted from the encoder per rotation, m1 denotes a number of four-multiplied pulses, fc denotes a predetermined frequency, and m2 denotes a number of pulses of the predetermined frequency fc. The motor driving speed can be measured by substituting the number of four-multiplied pulses for m1 and substituting the number of pulses of the predetermined frequency fc for m2, for a total detection time (Td=Tc+xcex94T), after a lapse of a constant sampling time Tc, that is, when the first four-multiplied pulse is inputted.
Because a phase error occurs during manufacture of the encoder, a phase difference between two pulse streams may not be exactly 90xc2x0 and a duty cycle of a pulse may not be 50%. Accordingly, the motor driving speed cannot be exactly detected. The reason that the motor driving speed cannot be exactly detected will be described in more detail.
As shown in FIGS. 3A-3C, where a phase difference between a first pulse stream P1a and a second pulse stream P2a is not exactly 90xc2x0, a four-multiplied pulse stream P3a cannot be constantly generated. Thus, an error can occur for the constant sampling period Tc. A remaining period xcex94T1 in a case where the sampling period Tc starts from a pulse having a phase A is different from a remaining time xcex94T2 in a case where the sampling period Tc starts from a pulse having a phase Axe2x80x2. Although a conventional motor drives at a same driving speed, a problem exists that a speed detection error occurs according to a sampling start point for a motor driving speed measurement.
Further, the motor driving speed conventionally varies while the motor performs a given work process. Referring to FIG. 4, a graph shows a case where the motor driving speed varies in a form of a sequence of R1xe2x86x92R2xe2x86x92R3 (R3 less than R1 less than R2) according to operating conditions. Thus, a result of a detection of the motor driving speed varies with the motor driving speed. Accordingly, a problem exists in that the driving speed of the conventional motor cannot be precisely and stably controlled.
If a phase difference between the two pulses is not proper because of, for example, a defect of the encoder, the result of the detection of the motor driving speed is not constant according to the sampling start point at the same speed. When the driving of the motor is controlled based on incorrect motor information, a motor control operation cannot be precisely performed and a response characteristic of the motor can deteriorate.
Therefore, it is an aspect of the present invention to provide an apparatus for controlling driving speed of a motor, which can precisely control a motor driving speed by adjusting a detection time for pulses outputted from an encoder.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
In accordance with the above and/or other aspects, an apparatus for controlling a driving speed of a motor, comprises: a motor; a motor driver to drive the motor at a predetermined driving speed; an encoder communicating with the motor driver, to output pulses; and a motor controller adjusting a detection time for the pulses received from the encoder to measure the motor driving speed.